package com.industrial.premu.service.impl;

import com.industrial.common.core.web.domain.AjaxResult;
import com.industrial.common.core.web.page.TableDataInfo;
import com.industrial.premu.domain.PreMuBenefitEvaluation;
import com.industrial.premu.dto.PreMuChartsDto;
import com.industrial.premu.mapper.PreMuNaturalIndicatorAnalysisMapper;
import com.industrial.premu.service.IPreMuNaturalIndicatorAnalysisService;
import com.industrial.premu.vo.PreMuChartsVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class PreMuNaturalIndicatorAnalysisServiceImpl implements IPreMuNaturalIndicatorAnalysisService {

    @Autowired
    private PreMuNaturalIndicatorAnalysisMapper preMuNaturalIndicatorAnalysisMapper;

    /**
     * 查询近五年的数据
     *
     * @param preMuChartsDto
     * @return
     */
    @Override
    public AjaxResult queryDataFromThePastFiveYears(PreMuChartsDto preMuChartsDto) {

        List<PreMuBenefitEvaluation> result = preMuNaturalIndicatorAnalysisMapper.queryDataFromThePastFiveYears(preMuChartsDto);

        return null;
    }

    @Override
    public List<PreMuBenefitEvaluation> queryAreaOrderTable(PreMuChartsDto preChartsDto) {
        return preMuNaturalIndicatorAnalysisMapper.queryAreaOrderTable(preChartsDto);
    }

    /**
     * 查询区域的图表
     *
     * @param preChartsDto
     * @return
     */
    @Override
    public AjaxResult queryAreaOrderEcharts(PreMuChartsDto preChartsDto) {
        List<PreMuBenefitEvaluation> preMuBenefitEvaluations = preMuNaturalIndicatorAnalysisMapper.queryAreaOrderTable(preChartsDto);
        return AjaxResult.success(preMuBenefitEvaluations);
    }

    /**
     * 查询行业表格
     *
     * @param preChartsDto
     * @return
     */
    @Override
    public List<PreMuBenefitEvaluation> queryHyOrderTable(PreMuChartsDto preChartsDto) {
        List<PreMuBenefitEvaluation> preMuBenefitEvaluations = preMuNaturalIndicatorAnalysisMapper.queryHyOrderTable(preChartsDto);
        return preMuBenefitEvaluations;
    }

    /**
     * 查询行业的图表
     *
     * @param preChartsDto
     * @return
     */
    @Override
    public AjaxResult queryHyOrderEcharts(PreMuChartsDto preChartsDto) {
        List<PreMuBenefitEvaluation> preMuBenefitEvaluations = preMuNaturalIndicatorAnalysisMapper.queryHyOrderTable(preChartsDto);
        return AjaxResult.success(preMuBenefitEvaluations);
    }

    /**
     * 近五年数据
     *
     * @param preChartsDto
     * @return
     */
    @Override
    public List<PreMuChartsVo> groupEconomyByYears(PreMuChartsDto preChartsDto) {
        return preMuNaturalIndicatorAnalysisMapper.groupEconomyByYears(preChartsDto);
    }

    @Override
    public List<PreMuChartsVo> groupEconomyByProvince(PreMuChartsDto preChartsDto) {
        return preMuNaturalIndicatorAnalysisMapper.groupEconomyByProvince(preChartsDto);
    }

    @Override
    public List<PreMuChartsVo> groupEconomyByCityAndCounty(PreMuChartsDto preChartsDto) {
        return preMuNaturalIndicatorAnalysisMapper.groupEconomyByCityAndCounty(preChartsDto);
    }
}





